-
Notifications
You must be signed in to change notification settings - Fork 345
Some misc upstream fixes (mostly 516 and movement related) #5945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…x length (#81869) ## About The Pull Request There's a one character discrepancy between the maximum length in the tgui input panel and that of the copied text, that's because `copytext("123456", 6)` will actually return `"12345"`, cutting off the last digit, so we need to increment the `max_length` by one if we want the right amount of characters to be return. This is also somewhat detailed in the DM lang "bluebook", and is in line with how `list.Copy()` also works. ## Why It's Good For The Game This fixes the museum password pad, which trimmed the last character of the input because of this oversight. ## Changelog :cl: fix: Fixed the tgui text input trimming the last character of the input if it hits the maximum length. fix: This also fixes the PIN pad leading to the right wing of the museum away mission. /:cl:
## About The Pull Request Title. Adds a new argument to the factory proc, the New(), adds a variable, and changes ui_state() to return that variable. The variable is always_state by default. ## Why It's Good For The Game It allows custom behavior to be injected into the ui_state logic of the basic input datums. This is good because there are circumstances where always_state isn't acceptable. Ex. you open tgui_input_list(mob/user), and the mob dies or is deleted. The list stays open, the contents can be picked, despite this not being what the author wants. With this PR, you can make sure the list closes and inputs are invalid in circumstances of your choosing without having to completely re-make the input procs via copypasting. ## Changelog :cl: code: TGUI input datums can now accept custom ui_states /:cl:
## About The Pull Request Fixes #79321 ```dm /datum/tgui/proc/open() if(!user.client) return FALSE ``` The TGUI window won't even `open()` and do any work if we don't have a client, so let's just explicitly get the hell out of dodge if we don't have a client associated with a mob in these procs. Adding a `?` to handle the runtime in the linked issue only obfuscates the deeper issue because of the aforementioned code snippet. ## Why It's Good For The Game Clientless monkeys will still somehow be able to interact with stuff through their random behavior, and this is still plausible enough to show up on live servers every so often, so let's just patch it out early. These alerts are meant for player user input, so if we don't have a player, let's bounce. ## Changelog A player would never ever notice this.
this should mirror `input() as text`, and `input() as text` has no default max length. Anything that needs a limited input must specifically request it to avoid collateral damage for inputs that don't need it (like admin verbs)
## About The Pull Request Fixes default max_lenght on TGUI input text. Chromium ignores symbols in maxlength attribute, so instead of infinity it was... 1. Without setting attribute, it was literally infinite (close enough)  Closes #89331 ## Why It's Good For The Game  ## Changelog :cl: fix: Fixed TGUI text inputs, that's allows only 1 symbol instead infinity /:cl:
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> This is a REALLY hot proc, takes up to like 2% of total cpu at highpop Let's micro it then First, clients do not go null at random. It's not predictable per say but it is consistent. We can use this understanding to remove a bunch of null checks here For loops are expensive. So rather then doing one each keyLoop, let's cache the client's intended move direction on the client. Simplifies some other code too There is no sense running a turn call if it would have no effect, let's be more intelligent about this <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> :cl: refactor: Fucks with how movement keys are handled. Please report any bugs /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
## About The Pull Request I was failing to clear the input removal if we had no movement So you'd step, stop moving, and retain it Then whenever we rotate, we continue to hold onto that removal forever. Weird. Handles... part of? #81501 ## Changelog :cl: fix:Blocking movement works properly again /:cl:
…orgot (#75103) ## About The Pull Request Title. ## Why It's Good For The Game I broke everything.
This was referenced Mar 17, 2025
This was referenced Mar 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code: Fix
fix da bug
Code: Improvement
exactly what it says on the tin
Code: TGUI
Involves TGUI in some way, shape or form
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
ports the following PRs from tg:
tgui_alert()
and siblings tgstation/tgstation#79322Fixes movement keys stuck issue tgstation/tgstation#90057Why It's Good For The Game
Changelog
🆑
code: (nikothedude) TGUI input datums can now accept custom ui_states.
fix: (Ghommie) Fixed the tgui text input trimming the last character of the input if it hits the maximum length.
fix: (itsmeow) Fixed TGUI assets and icons sometimes not showing up until you refreshed the page on 516 clients.
fix: (Aylong) Fixed TGUI text inputs that allows only 1 symbol instead infinity.
/:cl: